package com.ax.center.urils;

import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.LocalDateTimeUtil;
import org.springframework.format.annotation.DateTimeFormat;

import java.text.SimpleDateFormat;
import java.time.DateTimeException;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Calendar;
import java.util.Date;

/**
 * @author zy
 * @date 2023/7/4 9:33
 */
public class TimeUtils {
    /**
     * 返回时间格式如：2020-02-17
     * @param time
     * @return
     */
    public static String getStartOfData(Date time) {
        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        String format = LocalDateTime.now().format(df);
        return format;

    }

}
